#!/usr/bin/env python
import os, urllib, sys, re

try:
    f = urllib.urlopen(sys.argv[1])
    fall = f.read()
    f.close()
except:
    sys.exit('''Usage: grasp_picasa.py <http link of picasa>
Eg:
grasp_picasa.py http://picasaweb.google.com/coomteng/081101_Uetliberg
''')

srclist=re.findall(r'src\=\"(?P<c>.+?)\"', fall, re.S)
for oldpic in srclist:
     newpic=oldpic.replace('/s288/','/s800/')
     print '<img src="%s" /><br />'%newpic
print len(srclist)